package com.wangp.model.views;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.View;

@Component("myview")
public class MyTestView implements View{

	@Override
	public String getContentType() {
		return "text/html";
	}

	@Override
	public void render(Map<String, ?> map, HttpServletRequest req, HttpServletResponse resp) throws Exception {
		resp.setContentType("text/html; charset=UTF-8");//
		resp.getWriter().print("自定义的MyTestView 试图" + ":"+map.get("name"));
	}

}
